//
//  TZHttpTool.h
//
//  Created by tanzhen on 15-8-25.
//  Copyright (c) 2015年 ttouch. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface TZHttpTool : NSObject

+ (void)get:(NSString *)url params:(NSDictionary *)params success:(void (^)(NSDictionary *result))success failure:(void (^)(NSString *error))failure;

+ (void)post:(NSString *)url params:(NSDictionary *)params success:(void (^)(NSDictionary *result))success failure:(void (^)(NSString *msg))failure;

/// 上传多张图片
+ (void)uploadOperationToUrl:(NSString *)url params:(NSDictionary *)params files:(NSArray *)files process:(void (^)(NSInteger writedBytes, NSInteger totalBytes))process completeOne:(void (^)(BOOL successed, NSDictionary *result))completeOne complete:(void (^)())complete;

/// 上传单张图片
+ (void)uploadImageWithUrl:(NSString *)url params:(NSDictionary *)params image:(UIImage *)image completion:(void (^)(NSDictionary *result, NSError *error))completion;

+(NSString *)getNewDate:(NSString *)dateStr;

@end
